//
//  ChatSystemInfo.h
//  SportSocial
//
//  Created by yull on 15/1/28.
//  Copyright (c) 2015年 yull. All rights reserved.
//

typedef NS_ENUM(NSInteger, SystemInfoFriendType)
{
    //1 添加好友申请  2:拒绝添加好友  3添加好友  4 删除好友
    SystemInfoFriendTypeApply = 1,
    SystemInfoFriendTypeRefuse,
    SystemInfoFriendTypeAdd,
    SystemInfoFriendTypeDelete,
    SystemInfoFriendTypeNone,
};

typedef NS_ENUM(NSInteger, SystemInfoGroupType)
{
    // 1xx人申请加入xx群   2xx群的管理员xx拒绝了您的加入 3xx群的管理员xx邀请您加入  4您邀请xx人加入xx群被拒绝了  5xx人加入了xx群  发送给管理员   6您被XX群的xx管理员踢出了 7您创建的群【xxx】已通过审核 8 您创建的群【xxx】未通过审核 9 xx群被群主解散了
    SystemInfoGroupTypeApply = 1,
    SystemInfoGroupTypeRefuse,
    SystemInfoGroupTypeInvite,
    SystemInfoGroupTypeRefuseInvite,
    SystemInfoGroupTypeJoin,
    SystemInfoGroupTypeKickout,
    SystemInfoGroupTypeCheckFinish,
    SystemInfoGroupTypeCheckFail,
    SystemInfoGroupTypeDismiss,
    SystemInfoGroupTypeNone,
};

typedef NS_ENUM(NSInteger, SystemInfoType)
{
    SystemInfoTypeFriend,
    SystemInfoTypeGroup,
};

#import <Foundation/Foundation.h>
#import "Message.pb.h"
#import <FMResultSet.h>

@interface ChatSystemInfo : NSObject

@property (nonatomic, assign) UInt64 dbId;

@property (nonatomic, assign) UInt64 userId;

@property (nonatomic, copy) NSString *userName;

@property (nonatomic, assign) UInt64 groupId;

@property (nonatomic, copy) NSString *groupName;

@property (nonatomic, assign) UInt64 createId;

@property (nonatomic, copy) NSString *createName;

@property (nonatomic, copy) NSString *par;

@property (nonatomic, assign) UInt64 msgId;

@property (nonatomic, assign) SystemInfoType infoType;

@property (nonatomic, assign) SystemInfoFriendType friendType;

@property (nonatomic, assign) SystemInfoGroupType groupType;

@property (nonatomic, copy) NSString *icon;

@property (nonatomic, assign) NSTimeInterval time;

@property (nonatomic, copy) NSString *content;

@property (nonatomic, copy) NSString *key;

@property (nonatomic, assign) BOOL isRead;

+ (instancetype)systemInfoWithFriendMsg:(FriendNotifyMessage *)friendMsg;

+ (instancetype)systemInfoWithResultSet:(FMResultSet *)resultSet;

+ (instancetype)systemInfowithGroupMsg:(GroupNotifyMessage *)groupMsg;

@end
